package com.fourth.shopping.dao;

import com.fourth.entity.Goods;
import com.fourth.entity.Item;
import com.fourth.vo.PageCondition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface GoodsMapper {
    List<Goods> getGoodsByLimit(@Param("goods") Goods goods,
                                @Param("condition") PageCondition condition);

    Integer getGoodsCountByLimit(@Param("goods") Goods goods);

    Integer deleteGoods(String goodsId);

    Integer addGoods(Goods goods);

    Goods getGoodsById(@Param("goodsId")Integer goodsId);

    List<Goods> getGoodsPageByType(@Param("item") Item item,
                                   @Param("condition") PageCondition condition);

    Integer getGoodsCountByItem(@Param("item") Item item);
}